{{!
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements.  See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership.  The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License.  You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
}}
<div class="panel panel-default">
  <div class="panel-heading">General</div>
  <div class="panel-body">
    <div class="form-group">
      <label for="inputEmail" class="control-label col-xs-2">Main class<span class="requiredField">&nbsp;*</span></label>
      <div class="col-xs-7">
        {{input type="text" class="form-control" name="main-class" value=actionModel.mainClass placeholder="Main class"}}
        {{field-error model=this field='actionModel.mainClass' showErrorMessage=showErrorMessage}}
      </div>
    </div>

    <div class="form-group">
      <label class="control-label col-xs-2">Java Options</label>
      <div class="col-xs-3">
        <input type="radio" name="javaOpt" checked={{if (eq isSingle false) 'checked'}}  {{action "setIsSingle" false preventDefault=false on="change"}}> Java Option List
      </div>
      <div class="col-xs-3">
        <input type="radio" name="javaOpt" checked={{if (eq isSingle true) 'checked'}}  {{action "setIsSingle" true preventDefault=false on="change"}}> Java Options
      </div>
    </div>
    <div id="single-option">
      <div class="form-group">
        <label for="inputPassword" class="control-label col-xs-2 visibility-hidden">Java opts</label>
        <div class="col-xs-7">
          {{input type="text" class="form-control" value=actionModel.javaOpts name="java-opts" placeholder="Java opts"}}
        </div>
      </div>
    </div>
    <div id="arg-option">
      {{#arg-config args=actionModel.javaOpt register="register" title="Java Opt" hideLabel="false"}}{{/arg-config}}
    </div>
    {{#jobxml-config jobXml=actionModel.jobXml openFileBrowser="openFileBrowser" register="register"}}{{/jobxml-config}}
      <div class="form-group">
      <label for="inputPassword" class="control-label col-xs-2">Capture output</label>
        <div class="col-xs-10">
          <div class="checkbox">
            <label title="capture output of the action">{{input type="checkbox" name="capture-output" checked=actionModel.captureOutput}}</label>
          </div>
        </div>
      </div>
  </div>
</div>
<div class="panel panel-default">
  <div class="panel-heading">Transition</div>
  <div class="panel-body handlerPanel">
    {{#transition-config transition=transition killNodes=killNodes currentNode=currentNode register="register"}}{{/transition-config}}
  </div>
</div>
{{#action-credential-config credentials=credentials actionCredentials=actionModel.credentials}}{{/action-credential-config}}
<div class="panel panel-default">
  <div class="panel-heading" id="accordion" data-toggle="collapse" data-parent="#accordion" data-target="#collapseOne">
      Advanced Properties
      <i class="indicator glyphicon glyphicon-chevron-down pull-right"></i>
    </div>
    <div id="collapseOne" class="panel-collapse collapse">
      <br/>
      <div class=" panel panel-default">
        <div class="panel-body handlerPanel">
          <div class="form-group">
            <label for="inputEmail" class="control-label col-xs-2">Resource Manager</label>
            <div class="col-xs-7">
              {{input type="text" class="form-control" name="job-tracker" value=actionModel.jobTracker placeholder="Resource Manager"}}
            </div>
            {{field-error model=this field='actionModel.jobTracker' showErrorMessage=showErrorMessage}}
          </div>
          <div class="form-group">
            <label for="inputPassword" class="control-label col-xs-2">Name node</label>
            <div class="col-xs-7">
              {{input type="text" class="form-control"  name="name-node" value=actionModel.nameNode validations="required,noWhitespace" placeholder="Name node"}}
            </div>
          </div>
          {{#file-config files=actionModel.files openFileBrowser="openFileBrowser" register="register" title="File"}}{{/file-config}}
          {{#file-config files=actionModel.archives openFileBrowser="openFileBrowser" register="register" title="Archive"}}{{/file-config}}
          {{#prepare-config prepare=actionModel.prepare openFileBrowser="openFileBrowser" register="register"}}{{/prepare-config}}
          {{#arg-config args=actionModel.args register="register" title="arg"}}{{/arg-config}}
        </div>
      </div>
      <div class=" panel panel-default">
        <div class="panel-heading">Configuration</div>
        <div class="panel-body handlerPanel">
          {{#name-value-config configuration=actionModel.configuration register="register"}}{{/name-value-config}}
        </div>
      </div>
    </div>
  </div>
  {{#sla-info slaInfo=actionModel.slaInfo register="register" slaEnabled=actionModel.slaEnabled register="register"}}{{/sla-info}}
